<?
if(isSet($_GET['Lang'])){
	$Lang = $_GET['Lang'];
	$_SESSION['Lang'] = $Lang;
	setcookie('Lang', $Lang, time() + (3600 * 24 * 30));
}
else if(isSet($_SESSION['Lang'])){	$Lang = $_SESSION['Lang']; }
else if(isSet($_COOKIE['Lang'])){	$Lang = $_COOKIE['Lang']; }
else{ $Lang = 'es'; }

switch($Lang){
	case 'es':
	$Lang_file = 'Idioma.es.php';
	break;

	case 'en':
	$Lang_file = 'Idioma.en.php';
	break;

	default:
	$Lang_file = 'Idioma.es.php';
}

require_once $Lang_file;
?>